package com.example.bakend.service;

import com.example.bakend.pojo.Book;
import com.example.bakend.pojo.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface BookService {
    PageInfo selectBooks(Integer pageNum,Integer pageSize);

    List<Book> selectBooks();

    Book selectBook(Integer id);

    Integer insertBook(Book book);

    Integer updateBook(Book book);


    PageInfo getBooks(String title,
                        String author,
                        LocalDateTime publishDateBegin,
                        LocalDateTime publishDateEnd,
                        Integer pageNum,
                        Integer pageSize);

    Integer deleteBook(Integer id);

    Integer deleteBooks( List<Integer> ids);

    List<Book> getBooksForCategory(Integer categoriesId);

}
